package br.com.aeso.bancoCurriculo.model.usuario.impl;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import br.com.aeso.bancoCurriculo.model.comum.negocio.impl.EntidadeNegocioImpl;
import br.com.aeso.bancoCurriculo.model.curriculo.impl.CurriculoImpl;
import br.com.aeso.bancoCurriculo.model.usuario.Usuario;

/**
 * @author Giulliano Ferreira
 * 
 */
@Entity
@Table(name = "usuario")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class UsuarioImpl extends EntidadeNegocioImpl implements Usuario,
		Serializable {

	private static final long serialVersionUID = 1L;

//	@Id
//	@Column(name = "ID", nullable = false)
//	private String id;


	@Column(name = "EMAIL_USUARIO", nullable = false)
	private String email;

	@Column(name = "LOGIN_USUARIO", nullable = false)
	private String login;

	@Column(name = "SENHA_USUARIO", nullable = false)
	private String senha;

	@Column(name = "TIPO_USUARIO", nullable = false)
	private String tipo;
	
	@OneToOne(mappedBy = "usuario")
	private CurriculoImpl curriculos;

	public CurriculoImpl getCurriculos() {
		return curriculos;
	}

	public void setCurriculos(CurriculoImpl curriculos) {
		this.curriculos = curriculos;
	}

//	public String getId() {
//		return id;
//	}
//
//	public void setIdUsuario(String id) {
//		this.id = id;
//	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String nome) {
		this.email = nome;
	}

	public String getLogin() {
		return login;
	}

	public void setLogin(String login) {
		this.login = login;
	}

	public String getSenha() {
		return senha;
	}

	public void setSenha(String senha) {
		this.senha = senha;
	}

	public String getTipo() {
		return tipo;
	}

	public void setTipo(String tipo) {
		this.tipo = tipo;
	}
	
	
	
	public String toString() {
		return "[" + login + "] - " + login;
	}
}